<template>
	<view v-if="pageShow">
		<u-sticky bgColor="#a3d8f5">
			<view class="mainpadding" :style="{paddingTop:menutop+'rpx'}">
				<view class="flexleft">
					<image src="@/static/image/system/hsz.png" class="hszclass" mode=""></image>
					<view class="xiaobai fonweight" style="font-size: 35rpx;">红十字基金会“孤寡老人大病救助基金”</view>
				</view>
				<view class="margin_top flexbetween">
					<u-icon name="arrow-left" color="#fff" size="24" @click="backpage()"></u-icon>
					<view class="xiaobai fonweight sanshier" style="font-size: 32rpx;">我的公益申请</view>
					<image src="@/static/image/system/list.png" mode="" class="topliclass" @click="toplistfn"></image>
				</view>
			</view>
		</u-sticky>
		<template v-if="userInfo.gyry && userInfo.gyry.status==2">
			<view class="ffffff mainpadding">
				<view class="ershiba xiaohei fonweight">个人信息
					<text class="ershiba xiaohong fonweight">*</text>
				</view>
				<view class="margin_top xiahuaxian flexleft">
					<view class="ershiba xiaohei margin_right2">姓名</view>
					<input placeholder="请输入" type="text" v-model="userInfo.gyry.name" disabled=""/>
				</view>
				<view class="margin_top xiahuaxian flexleft">
					<view class="ershiba xiaohei margin_right2">性别</view>
					<view class="smalltext xiaohei margin_right2">{{userInfo.gyry.sex==1?"男":"女"}}</view>
				</view>

				<view class="margin_top xiahuaxian flexleft">
					<view class="ershiba xiaohei margin_right2">年龄</view>
					<input placeholder="请输入" type="number" v-model="userInfo.gyry.age" disabled/>
				</view>

				<view class="margin_top xiahuaxian flexleft">
					<view class="ershiba xiaohei margin_right2">手机号（+86）</view>
					<input placeholder="请输入手机号" type="number" v-model="userInfo.gyry.tel" disabled/>
				</view>
				<view class="margin_top flexleft">
					<view class="ershiba xiaohei margin_right2">服务城市</view>
					<input placeholder="请输入" type="text" v-model="userInfo.gyry.fwaddress" disabled/>
				</view>
			</view>
			<view class="ffffff mainpadding margin_top">
				<view class="ershiba xiaohei fonweight">照片
					<text class="ershiba xiaohong fonweight">*</text>
				</view>
				<view class="flexleft margin_top">
					<image class="tjtp" :src="userInfo.gyry.image_text" mode="" @click="lbtpriview(0,[userInfo.gyry.image_text])"></image>
				</view>
			</view>
			<view class="ffffff mainpadding margin_top">
				<view class="ershiba xiaohei fonweight">资历
					<text class="ershiba xiaohong fonweight">*</text>
				</view>
				<textarea style="width: 100%;" class="margin_top textarea" placeholder="请输入..." disabled maxlength="-1"
					v-model="userInfo.gyry.zl"></textarea>
			</view>
			<view class="ffffff mainpadding margin_top">
				<view class="ershiba xiaohei fonweight">自我介绍
					<text class="ershiba xiaohong fonweight">*</text>
				</view>
				<textarea style="width: 100%;" class="margin_top textarea" placeholder="请输入..." disabled maxlength="-1"
					v-model="userInfo.gyry.js"></textarea>
			</view>
			<view class="ffffff mainpadding margin_top">
				<view class="ershiba xiaohei fonweight">擅长
					<text class="ershiba xiaohong fonweight">*</text>
				</view>
				<textarea style="width: 100%;" class="margin_top textarea" placeholder="请输入..." disabled maxlength="-1"
					v-model="userInfo.gyry.sc"></textarea>
			</view>
		</template>
		<template v-else>
			<view class="flexcolumn">
				<view class="placeholderimage"></view>
				<!-- status -->
				<view class="xiaohui smalltext textcenter mainpadding_top" style="margin-top: 0;color: #666666;font-size: 40rpx;line-height: 80rpx;">
					<text v-if="userInfo.gyry==null">您还没有提交申请</text>
					<br />
					<text v-if="userInfo.gyry==null">如需申请，请点击</text>
					<text v-if="userInfo.gyry && userInfo.gyry.status==1">您的申请审核中，请耐心等待</text>
					<text v-if="userInfo.gyry && userInfo.gyry.status==3">您的申请已驳回，<text class="xiaohong" v-if="userInfo.gyry.bz"><text class="xiaohui">原因：</text>“{{userInfo.gyry.bz}}”</text>如需重新申请，请点击</text>
					<br />
					<text class="xiaohuang" v-if="userInfo.gyry==null || userInfo.gyry.status==3"  style="color: #cc0000;margin-top: 30rpx;display: inline-block;" @click="jumpurl('/pages/zhengce/gongyibm')">立即申请</text> </view>
			</view>
		</template>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				// #ifdef H5
				menutop: 80,
				// #endif
				// #ifdef MP-WEIXIN
				menutop: 0,
				// #endif	
				page: 1,
				limit: 12,
				list: {
					data: []
				},

				name: "",
				sex: "1",
				age: "",
				tel: "",
				fwaddress: "",
				image: "",
				image_text: "",
				zl: "",
				js: "",
				sc: "",
				userInfo: {},
				pageShow:false
			}
		},
		onLoad() {
			// #ifdef MP-WEIXIN
			this.menutop = uni.getMenuButtonBoundingClientRect().top * 2
			// #endif

		},
		onShow() {
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/user/index', 'GET', {}).then(res => {
					this.userInfo = res.data
					this.pageShow  = true
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	/deep/.u-radio__text {
		font-size: 28rpx !important;
	}
	
</style>